<template>
  <div class="xblib">
    <van-grid :border="false" :column-num="2">
      <van-grid-item
        v-for="(v, index) in arr"
        :key="index"
        @click="fun2(v.proid)"
      >
        <van-image :src="v.img3" />
        <p>{{ v.proname }}</p>
        <span>{{ v.originprice }}</span>
      </van-grid-item>
    </van-grid>
  </div>
</template>

<script>
import service from "../../../../request/service.js";

export default {
  data() {
    return {
      list: {},
      arr: [],
    };
  },
  methods: {
    fun2(v) {
      this.$router.push({
        path: "/infogoods",
        query: { id: v },
      });
    },
  },
  mounted() {
    service({
      url: "api/pro/list",
      method: "get",
      params: {
        limitNum: 60,
      },
    }).then((res) => {
      this.arr = res.data.data;
      console.log(this.arr);
    });
  },
};
</script>

<style>
.xblib {
  width: 100%;
  display: flex;
  /* justify-content: space-around; */
  column-count: 2;
  column-gap: 0;
  margin-top: 0.625rem;
  margin-bottom: 0.3125rem;
}
</style>